﻿using Microsoft.DirectX.DirectInput;

namespace breakoutsharp.core
{
    public class PaddleControl
    {
        private Key moveLeft;
        private Key moveRight;
        private bool movingLeft;
        private bool movingRight;

        public bool MovingLeft
        {
            get
            {
                return movingLeft;
            }

            set
            {
                movingLeft = value;
                if (value)
                    movingRight = false;
            }
        }

        public bool MovingRight
        {
            get { return movingRight; }
            set
            { 
                movingRight = value;
                if (movingRight)
                    movingLeft = false;
            }
        }

        public Key MoveLeft
        {
            get { return moveLeft; }
            set { moveLeft = value; }
        }

        public Key MoveRight
        {
            get { return moveRight; }
            set { moveRight = value; }
        }

        public PaddleControl(Key left, Key right)
        {
            moveLeft = left;
            moveRight = right;
        }
    }
}
